package GameEngine.Model;

import GameEngine.Collision.CollisionObject;
import GameEngine.Drawables.Drawable;

public class GameObject {
	private int PosX;
	private int PosY;
	private int width;
	private int height;
	private boolean active;
	private boolean visible;
	private boolean collidable;

	private Drawable drawable;
	private CollisionObject collisionObject;
	private Cage cage = null;

	public void updateValues(GameObject go) {
		PosX = go.getPosX();
		PosY = go.getPosY();
		width = go.getWidth();
		height = go.getHeight();
		active = go.isActive();
		visible = go.isVisible();
		collidable = go.isCollidable();

		drawable = go.getDrawable();
		collisionObject = go.getCollisionObject();
		cage = go.getCage();
	}

	// getter / setter

	public int getPosX() {
		return PosX;
	}

	public int getPosY() {
		return PosY;
	}

	public int getWidth() {
		return width;
	}

	public int getHeight() {
		return height;
	}

	public boolean isActive() {
		return active;
	}

	public boolean isVisible() {
		return visible;
	}

	public boolean isCollidable() {
		return collidable;
	}

	public Drawable getDrawable() {
		return drawable;
	}

	public CollisionObject getCollisionObject() {
		return collisionObject;
	}

	// Setter
	public void setPosX(int posX) {
		PosX = posX;
		drawable.setPosX(PosX);
	}

	public void setPosY(int posY) {
		PosY = posY;
		drawable.setPosY(PosY);
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public void setHeight(int height) {
		this.height = height;
	}

	public void setActive(boolean active) {
		this.active = active;
	}

	public void setVisible(boolean visible) {
		this.visible = visible;
	}

	public void setCollidable(boolean collidable) {
		this.collidable = collidable;
	}

	public void setDrawable(Drawable drawable) {
		this.drawable = drawable;
	}

	public void setCollisionObject(CollisionObject collisionObject) {
		this.collisionObject = collisionObject;
	}

	public Cage getCage() {
		return cage;
	}

}
